This application relates to a method and apparatus to control a simple computer system and, specifically, to a method and apparatus that manages Java modal dialog boxes in an information appliance having a simple user interface.
Many conventional World Wide Web browsers are capable of executing Java applets. A Java applet is a computer program written in the Java programming language that is designed to execute within a World Wide Web browser. Such applets are often started when a user clicks on a button or link in a displayed Web page. Once started, an applet executes xe2x80x9cinsidexe2x80x9d the browser, performing whatever tasks it has been programmed to perform. xe2x80x9cJavaxe2x80x9d is a trademark of Sun Microsystems, Inc. in the United States and other countries.
One task that applets often perform is to ask a user for information. A Java applet may open a xe2x80x9cJava modal dialog boxxe2x80x9d on the display and wait for the user to input data in an indicated location in the modal dialog box. A modal dialog box is defined as a dialog box that will not leave the display until the user has entered the requested information. The system will stay in dialog box mode until the user enters the requested information. This situation occurs because conventional browsers tend to route all user input directly to a modal dialog box in a Java execution environment whenever a modal dialog box is open. Thus, if a modal dialog box is open, all user input is sent to the current Java applet. In many conventional systems, this means that many of the normal navigation keys are grayed out or inoperable when a dialog box is displayed.
In conventional systems, it sometimes happens that an applet displays a modal dialog box, but the user does not wish to enter the requested information or wishes to end execution of the applet. In conventional computer systems, some applets are well-behaved and provide an on screen mechanism within the modal dialog box itself that allows the user to get rid of the modal dialog box (through, for example, an input choice displayed within the modal dialog box). In conventional computer systems, even if the applet is poorly behaved and does not provide an onscreen mechanism within the modal dialog box that allows the user to escape from the modal dialog box, the user has options that will enable him to escape and to remove the dialog box from the screen.
For example, the user may perform a warm reboot of the computer (by, for example, pressing control/alt/delete in a Windows environment). Although rebooting stops execution of the applet, it does allow the user to get rid of the dialog box. As another example, the user might enter a xe2x80x9cwindow closexe2x80x9d command via an operating system interface. Thus, poorly behaved applets that do not provide an onscreen mechanism for closing their own dialog boxes are not a severe problem in conventional computer systems.
In recent years, a new category of computing device called xe2x80x9cinformation appliancesxe2x80x9d has become popular. Certain applets pose a more severe problem for these information appliances because information appliances contain simple, easy to use user-interfaces. For example, set-top boxes for televisions typically include only the set top box and a handheld remote unit. The remote unit contains a variety of keys or buttons indicating commands such as xe2x80x9cup,xe2x80x9d xe2x80x9cdown,xe2x80x9d xe2x80x9cselect,xe2x80x9d etc. The output for the system is displayed on a television set or similar monitor connected to the set top box. Typically, the user enters his input via a limited number of keys or buttons on the remote unit.
In the past, conventional set top boxes have not been able to execute Java applets on a web page. If, however, a set top box were to be capable of executing Java applets, the simple interface of the set top box would become problematic. For example, most set top boxes do not contain a way for the user to perform a warm reboot of the system. Thus, there is no provision for the user to perform a warm reboot of the system when an errant applet displays an unwanted modal dialog box in an information appliance. Similarly, conventional set top boxes are not designed so that the user can input operating system commands. Thus, a user cannot enter an operating system command to close a modal dialog box or to partially reboot the system, and the user may not want to turn off the system.
Accordingly, a need exists for a system and method implemented in information appliances that allow the user to escape from unwanted Java modal dialog boxes displayed by an applet.
A described embodiment of the present invention allows the user to escape from unwanted modal dialog boxes displayed by an applet, even though the modal dialog box does not contain a user interface designed to cancel or remove the dialog box from the display. The described embodiment allows the user to use so-called xe2x80x9cescapexe2x80x9d keys to indicate that the modal dialog box should be removed and/or closed. In general, these escape keys have other purposes within the user interface in addition to removing the modal dialog box.
A first escape key is a xe2x80x9cbackxe2x80x9d key. Although the back key is typically used within a web browser to return to a previously viewed web page, in dialog box mode, the effect of the back key is to remove a Java modal dialog box from the display (under certain circumstances, as discussed below). A second escape key in the described embodiment is the xe2x80x9cgotoxe2x80x9d key. The present invention detects a goto key press before the key press is sent to the Java modal dialog box, and allows the user to enter another page address (for example, a URL). Thus, a new page is displayed instead of the page containing the applet that displayed the dialog box.
In accordance with the purpose of the invention, as embodied and broadly described herein, the invention relates to a method performed by a browser to escape from a displayed dialog box generated by an errant applet, comprising: diverting user input from the applet to a main browser loop; receiving a user key press; and if the user key press is a first escape key, sending a close window event to an execution environment of the applet.
A fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.